package com.carrentalssm.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 注销Controller
 */
@Controller
@RequestMapping("/logout")
public class LogoutController {
	
	/**
	 * 注销
	 * @param request
	 * @return
	 */
	@RequestMapping("")
	public String logout(HttpServletRequest request) {
		request.getSession().setAttribute("user", null);
		return "redirect:login.jsp";
	}

}
